1. Field of the Invention
The present invention generally relates to various kinds of image-processing apparatuses, and a memory medium in which encoded image data are stored as a file.
2. Description of the Related Art
Since the amount of image data generally becomes great, it is common for compression coding to be carried out in advance of recording in a memory medium (recording medium). Various conventional compression coding technologies are available.
For example, Japanese Provisional Publication No. H5-64001 discloses an image-processing apparatus, wherein it is determined whether the amount of compressed image data exceeds the capacity of the memory medium for storing the compressed image data, and when it is determined in the affirmative, the compressed data are expanded, and then recompressed at a higher compression rate. In addition, another image-processing apparatus is also disclosed, wherein an image is divided into compression units, each of which is compressed, the amount of the compressed image data is compared with a predetermined size, the compression rate is adjusted according to the comparison result, and the compression is repeated for every compression unit. An image-processing apparatus similar to this is disclosed by Japanese Provisional Publication No. H6-22152.
Generally, the memory domain of a memory medium is managed in certain units (memory domain management units, or sectors), each unit (sector) being capable of storing a predetermined amount of data, and a number of such units are assigned for storing a file of, among other things, a compressed image.
Although various proposals have been disclosed for controlling the compression rate as described above, a technology that takes the memory domain management unit of the memory medium into consideration is not found in the conventional technologies. For this reason, when the file size of a compression image is 550 bytes where the sector is capable of storing 512 bytes, for example, two sectors, capable of storing 1024 bytes, are required, wasting 474 bytes of the memory domain. This is undesirable in respect to the efficient utilization of the memory medium. Especially, in the case of a memory medium that should be as small as possible and capable of storing as much data as possible, such as various memory cards used in digital cameras and portable apparatuses, waste of the memory domain should be avoided as much as possible.